<!DOCTYPE HTML>
<html>
<head>
    <title>Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="My Play Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- bootstrap -->
    <link href="./asset/css/bootstrap.min.css" rel='stylesheet' type='text/css' media="all" />
    <!-- //bootstrap -->
    <link href="./asset/css/dashboard.css" rel="stylesheet">
    <!-- Custom Theme files -->
    <link href="./asset/css/style.css" rel='stylesheet' type='text/css' media="all" />
    <script src="./asset/js/jquery-1.11.1.min.js"></script>
    <!--start-smoth-scrolling-->
    <!-- fonts -->
    <link href='http://fonts.useso.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='http://fonts.useso.com/css?family=Poiret+One' rel='stylesheet' type='text/css'>
    <!-- //fonts -->
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top"	>
    <div class="container-fluid">
        <div class="navbar-header">

            <a class="navbar-brand" href="index.php?c=index&m=index"><h1><img src="./asset/images/logo.png" alt="" /></h1></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <div class="top-search">
                <form action="index.php?c=index&m=search" method="post" class="navbar-form navbar-right">
                    <input type="text" name="search" class="form-control" placeholder="Search...">
                    <input type="submit" value="">
                </form>
<div class="header-top-right">

                <div class="signin">

                    <!-- pop-up-box -->
                    <script type="./asset/text/javascript" src="./asset/js/modernizr.custom.min.js"></script>
                    <link href="./asset/css/popuo-box.css" rel="stylesheet" type="text/css" media="all" />
                    <script src="./asset/js/jquery.magnific-popup.js" type="text/javascript"></script>
                    <!--//pop-up-box -->
                    <script>
                        $(document).ready(function() {
                            $('.popup-with-zoom-anim').magnificPopup({
                                type: 'inline',
                                fixedContentPos: false,
                                fixedBgPos: true,
                                overflowY: 'auto',
                                closeBtnInside: true,
                                preloader: false,
                                midClick: true,
                                removalDelay: 200,
                                mainClass: 'my-mfp-zoom-in'
                            });

                        });
                    </script>
                </div>
                <?php
                session_start();
               if(empty($_SESSION['user'])){
                   echo "<div class=\"signin\">
                    <a href=\"#small-dialog\" class=\"play-icon popup-with-zoom-anim\">Sign In</a>
                    <div id=\"small-dialog\" class=\"mfp-hide\">
                        <h3>Login</h3>
                        <div class=\"social-sits\">
                            <div class=\"facebook-button\">
                                <a href=\"#\">Connect with Facebook</a>
                            </div>
                            <div class=\"chrome-button\">
                                <a href=\"#\">Connect with Google</a>
                            </div>
                            <div class=\"button-bottom\">
                                <p>New account? <a href=\"#small-dialog2\" class=\"play-icon popup-with-zoom-anim\">Signup</a></p>
                            </div>
                        </div>
                        <div class=\"signup\">
                            <form action=\"index.php?c=index&m=login\" method=\"post\">
                                <input type=\"text\" name='user' class=\"email\"  required=\"required\"/>
                                <input type=\"password\" name='password' placeholder=\"Password\" required=\"required\"  title=\"Minimum 6 characters required\" autocomplete=\"off\" />
                                <input type=\"submit\"  value=\"LOGIN\"/>
                            </form>
                            <div class=\"forgot\">
                                <a href=\"#\">Forgot password ?</a>
                            </div>
                        </div>
                        <div class=\"clearfix\"> </div>
                    </div>
                </div>";
               }
               else
               {
                   echo "<button class=\"btn btn-success navbar-btn\">欢迎您".$_SESSION["user"]."</button>";
                   echo "<a class=\"btn btn-success navbar-btn\" href='index.php?c=index&m=outlogin'>立即注销</a>";
                   echo "<a class=\"btn btn-success navbar-btn\" href='index.php?c=index&m=choice'>已选名单</a>";

                  // <a href="addgouwuche.php?id=<?php echo $info[id];?

               }
                ?>
                <div class="clearfix"> </div>
            </div>
        </div>
        <div class="clearfix"> </div>
    </div>
</nav>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="main-grids">
        <div class="top-grids">
            <div class="recommended-info">
                <h3>Choice</h3>
            </div>
            </div>
　<?php
            foreach($data['recent'] as $rowr){
                echo "
            <div class=\"col-md-4 resent-grid recommended-grid slider-top-grids\">
                <div class=\"resent-grid-img recommended-grid-img\">
                    <a href=\"index.php?c=index&m=videopage&vid=".$rowr['vid']."\"><img src=\"./posters/".$rowr['pic']."\" alt=\"\" height=\"420\"/></a>
                    <div class=\"time\">
                        <p>".$rowr['uploaddate']."</p>
                    </div>
                    <div class=\"clck\">
                        <span class=\"glyphicon glyphicon-time\" aria-hidden=\"true\"></span>
                    </div>
                </div>
                <div class=\"resent-grid-info recommended-grid-info\">
                    <h3><a href=\"index.php?c=index&m=videopage&vid=".$rowr['vid']."\" class=\"title title-info\">".$rowr['videoname']."</a></h3>
                    <ul>
                        <li><p class=\"author author-info\"><a href=\"#\" class=\"author\">学校".$rowr['uploadadmin']."提供</a></p></li>
                        <li class=\"right-list\"><p class=\"views views-info\">".$rowr['hittimes']."次点击</p></li>
                    </ul>
                </div>
            </div>";
            }
            ?>
            <div class="clearfix"> </div>
        </div>
            </div>
<div class="clearfix"> </div>
<script src="./asset/js/bootstrap.min.js"></script>
</body>
</html>